using System;
using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Requests.Objects;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Requests
{
	public static class EntityProductReviewsCreateExtend
{
		public static ProductReviews ToCreateEntity(this RequestProductReviewsDto dto)
		{
			return new ProductReviews
			{
				PrIsAnonymous = dto.isAnonymous,
				PrParentId = dto.parentId,
				PrProductId = dto.productId,
				PrRating = dto.rating,
				PrReviewText = dto.reviewText,
				PrUser = dto.user,
			};
		}
	}
}
